﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace E.Y.E.Jobs_Temp
{
    public partial class MainInput : Form
    {
        public MainInput()
        {
            InitializeComponent();
            
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Rectangle workingArea = Screen.GetWorkingArea(this);
            this.Location = new Point(workingArea.Right - Size.Width,
                                      workingArea.Bottom - Size.Height);
            this.FormBorderStyle = FormBorderStyle.None;
            SummaryMode frSummaryMode = new SummaryMode();
            frSummaryMode.ShowDialog();
        }

        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == Keys.Escape)//(Keys.Control | Keys.F))
            {
                Application.Exit();
                return true;
            }
            else if (keyData == Keys.Down)
            {
                //Create Form 2 Here
                EditMode secondForm;
                secondForm = new EditMode();
                secondForm.Show();
                this.Hide();
            }
            else if (keyData == (Keys.Control | Keys.T))
            {
                this.TopMost = true;
            }
            else if (keyData == (Keys.Control | Keys.E))
            {
                Application.Exit();
            }
            return base.ProcessCmdKey(ref msg, keyData);
        }

        private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)
        {
            if (this.Visible == true)
            {
                this.Visible = false;
            }
            else
            {
                this.Visible = true;
            }
        }


        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void alwaysTopToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.TopMost = true;
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            string ReadUserInput = null;
            ReadUserInput = txtInput.Text;
            if (ReadUserInput == "a")
            {
                lblEYEJobs.Text = "text a entered";
            }
            else if (ReadUserInput == Keys.Escape.ToString())
            {
                Application.Exit();
            }
            else
                lblEYEJobs.Text = "some text entered";
        }
    }
}
